use serde_json::Value;

use crate::{
  input::{Opts, OptsApi},
  ty::drive::DriveStatusType,
};

/// # Input api 统一接口
///
/// # Rust
///```rust
/// use e_app::input::api;
/// use e_app::input::drive_init;
/// use e_app::input::Opts;
/// use e_utils::cmd::CmdResult;
/// use serde_json::Value;
/// #[tokio::main]
/// async fn main() -> e_utils::AnyResult<()> {
///   let opts = Opts::new(None as Option<Vec<&str>>)?;
///   if opts.init {
///     drive_init()?;
///   }
///   let mut res: CmdResult<Value> = CmdResult {
///     content: String::new(),
///     status: false,
///     opts: Value::Null,
///   };
///   match api(opts).await {
///     Ok(v) => {
///       res.content = v;
///       res.status = true;
///     }
///     Err(e) => res.content = e.to_string(),
///   }
///   println!("{}", res.to_string_pretty()?);
///   Ok(())
/// }
/// ```
pub async fn api(op: Opts, _opts: &mut Value) -> e_utils::AnyResult<String> {
  todo!("unix api")
}
